package com.cskaoyan.mapper;

import com.cskaoyan.bean.po.MarketGoods;
import com.cskaoyan.bean.po.MarketGoodsExample;
import com.cskaoyan.bean.vo.front.goodsvo.FilterCategoryVo;
import com.cskaoyan.bean.vo.front.goodsvo.HotGoodsList;
import com.cskaoyan.bean.vo.front.goodsvo.NewGoodsListVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MarketGoodsMapper {
    long countByExample(MarketGoodsExample example);

    int deleteByExample(MarketGoodsExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(MarketGoods record);

    int insertSelective(MarketGoods record);

    List<MarketGoods> selectByExampleWithBLOBs(MarketGoodsExample example);

    List<MarketGoods> selectByExample(MarketGoodsExample example);

    MarketGoods selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") MarketGoods record, @Param("example") MarketGoodsExample example);

    int updateByExampleWithBLOBs(@Param("record") MarketGoods record, @Param("example") MarketGoodsExample example);

    int updateByExample(@Param("record") MarketGoods record, @Param("example") MarketGoodsExample example);

    int updateByPrimaryKeySelective(MarketGoods record);

    int updateByPrimaryKeyWithBLOBs(MarketGoods record);

    int updateByPrimaryKey(MarketGoods record);

    List<MarketGoods> selectGoods();

    List<NewGoodsListVo> selectNewGoods(@Param("b") Boolean b, @Param("b1") boolean b1, @Param("value") Integer value);

    List<HotGoodsList> selectHotGoods(@Param("b") boolean b, @Param("b1") boolean b1, @Param("value") int value);

    List<NewGoodsListVo> selectFloorGoodsByCategoryId(@Param("id") Integer id, @Param("b") boolean b, @Param("value") Integer value);

    int selectGoodsCount();

    List<HotGoodsList> selectHotGoodsListByCategoryId(@Param("categoryId") Integer categoryId, @Param("page") Integer page);


    List<HotGoodsList> selectGoodsByBrandId(@Param("brandId") Integer brandId, @Param("page") Integer page);

    int selectGoodsCountByCategoryId(Integer categoryId);

    int selectGoodsCountByBrandId(Integer brandId);


    List<HotGoodsList> selectGoodsByKeyword(String keyword);

    Integer selectCategoryIdById(Integer id);

    List<HotGoodsList> selectGoodsByCategoryId(Integer categoryId);
}